﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autofac;
using Laugh.DependencyInjection;
using Laugh.Logging;

namespace Laugh
{
    public static class LaughStarter
    {
        public static IContainer Container { get; private set; }

        public static void Run(Action<ContainerBuilder> before = null)
        {
            LogCfg.Init();
            Ioc.Run(before);

            Container = Ioc.Container;
        }

        public static void Stop()
        {
            Ioc.Stop();
        }
    }
}
